<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>version</title>
    <link rel="stylesheet" href="../../model/element.css">
    <link rel="stylesheet" href="../../model/jsFn.css">
</head>
<body>
<div class="catalog">
    <h1>目录</h1>
    <ul>
        <li>
            <p><a href="#profile">version</a></p>
            <ul>
                <li><p><a href="#jsFn_info">info</a></p></li>
                <li><p><a href="#jsFn_isLoading">isLoading</a></p></li>
                <li><p><a href="#jsFn_install">install</a></p></li>
                <li><p><a href="#jsFn_downLoad">downLoad</a></p></li>
            </ul>
        </li>
    </ul>
</div>
<div id="profile">
    <h2>对象简介:</h2>
    <p>app版本控制类</p>
</div>
<div class="jsFnModel" id="jsFn_info">
    <h3>info:</h3>
    <div class="shape">
        <h3>函数使用样式</h3>
        <p>version.info() -> info</p>
    </div>
    <div class="profile">
        <h3>函数功能简介</h3>
        <p>获得版本信息</p>
    </div>
    <div class="version">
        <p>稳定性;2 - 稳定的</p>
        <p>新增于:v0.0.0</p>
    </div>
    <div class="params">
        <h3>参数列表:</h3>
        <p>无</p>
    </div>
    <div class="res">
        <h3>返回值:</h3>
        <p>JSON</p>
        <p>info.name:版本的名称,如1.1.5;info.code:版本号,如20;info.lastUpdateTime:版本上一次更新时间,格式为double型时间</p>
    </div>
    <div class="code">
        <h3>例子</h3>
        <pre>
            <code>
                let info = version.info();
                console.log(info);
            </code>
        </pre>
    </div>
    <div class="error">
        <h3>抛出错误</h3>
    </div>
</div>
<div class="jsFnModel" id="jsFn_isLoading">
    <h3>isLoading:</h3>
    <div class="shape">
        <h3>函数使用样式</h3>
        <p>version.isLoading() -> boolean</p>
    </div>
    <div class="profile">
        <h3>函数功能简介</h3>
        <p>是否正在下载</p>
    </div>
    <div class="version">
        <p>稳定性;2 - 稳定的</p>
        <p>新增于:v0.0.0</p>
    </div>
    <div class="params">
        <h3>参数列表:</h3>
        <p>无</p>
    </div>
    <div class="res">
        <h3>返回值:</h3>
        <p>boolean</p>
        <p>是否正在下载apk</p>
    </div>
    <div class="code">
        <h3>例子</h3>
        <pre>
            <code>
                console.log("是否正在下载",version.isLoading());
            </code>
        </pre>
    </div>
    <div class="error">
        <h3>抛出错误</h3>
    </div>
</div>
<div class="jsFnModel" id="jsFn_install">
    <h3>install:</h3>
    <div class="shape">
        <h3>函数使用样式</h3>
        <p>version.install(loadId) -> boolean</p>
    </div>
    <div class="profile">
        <h3>函数功能简介</h3>
        <p>安装apk</p>
    </div>
    <div class="version" style="background: #c3c363">
        <p>稳定性;1 - 不稳定的</p>
        <p>新增于:v0.0.1</p>
    </div>
    <div class="params">
        <h3>参数列表:</h3>
        <ul>
            <li>
                <p>loadId</p>
                <p>&nbsp;double&nbsp;</p>
                <p>有version.downLoad()得到的loadId</p>
            </li>
        </ul>
    </div>
    <div class="res">
        <h3>返回值:</h3>
        <p>boolean</p>
        <p>是否安装成功</p>
    </div>
    <div class="code">
        <h3>例子</h3>
        <pre>
            <code>
                version.downLoad(url).then(res=>{
                   version.install(res);
                });
            </code>
        </pre>
    </div>
    <div class="error">
        <h3>抛出错误</h3>
    </div>
</div>
<div class="jsFnModel" id="jsFn_downLoad">
    <h3>downLoad:</h3>
    <div class="shape">
        <h3>函数使用样式</h3>
        <p>version.downLoad(url) -> promise</p>
    </div>
    <div class="profile">
        <h3>函数功能简介</h3>
        <p>下载apk</p>
    </div>
    <div class="version" style="background: #c3c363">
        <p>稳定性;1 - 不稳定的</p>
        <p>新增于:v0.0.0</p>
    </div>
    <div class="params">
        <h3>参数列表:</h3>
        <ul>
            <li>
                <p>url</p>
                <p>&nbsp;string&nbsp;</p>
                <p>apk下载路径</p>
            </li>
        </ul>
    </div>
    <div class="res">
        <h3>返回值:</h3>
        <p>promise</p>
        <p>res(loadId),成功时返回loadId,若正在下载,返回;rej(message),失败时返回失败原因</p>
    </div>
    <div class="code">
        <h3>例子</h3>
        <pre>
            <code>
                version.downLoad(url).then(res=>{
                    console.log("下载成功");
                }).catch(e=>{
                    console.log("下载失败");
                })
            </code>
        </pre>
    </div>
    <div class="error">
        <h3>抛出错误</h3>
    </div>
</div>
<div class="author">
    <p>by-草草</p>
</div>
</body>
</html>